/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.z100h.supplychain.purchase.entity;

import java.io.Serializable;
import java.util.List;

import org.activiti.editor.language.json.converter.util.CollectionUtils;

import com.alibaba.fastjson.JSONArray;
import com.jeeplus.common.utils.StringUtils;

/**
 * 
 * sku查看项目上报组成
 *
 * @author Elvin Zhao - 279152260@qq.com
 * @version 1.0 Created on 2019年12月13日 下午2:39:42
 */
public class PurchaseOrderItemErpInfo implements Serializable {

	private static final long serialVersionUID = 1L;

	private String projectName;

	private String serviceType;

	private String createDate;

	private Integer amount; // 数量

	private String picUrl;

	public PurchaseOrderItemErpInfo() {
		super();
	}

	/**
	 *
	 * @return 
	 */
	public String getProjectName() {
		return projectName;
	}

	/**
	 *
	 * @param projectName
	 */
	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	/**
	 *
	 * @return 
	 */
	public String getServiceType() {
		return serviceType;
	}

	/**
	 *
	 * @param serviceType
	 */
	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	/**
	 *
	 * @return 
	 */
	public Integer getAmount() {
		return amount;
	}

	/**
	 *
	 * @param amount
	 */
	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	/**
	 *
	 * @return 
	 */
	public String getPicUrl() {
		return picUrl;
	}

	/**
	 *
	 * @param picUrl
	 */
	public void setPicUrl(String picUrl) {

		if (StringUtils.isNotBlank(picUrl)) {
			List<Object> list = JSONArray.parseArray(picUrl);
			if (CollectionUtils.isNotEmpty(list)) {
				String url = (String) list.get(0);
				this.picUrl = "http://218.2.197.230:8889" + url;
			}
		}
	}

	public static void main(String[] args) {
		String aaa = "[\"/newRepair/4063090816926720/QRpz3KzLQWydRzieseEqzA.jpg\"]";
		List<Object> list = JSONArray.parseArray(aaa);
		if (CollectionUtils.isNotEmpty(list)) {
			String url = (String) list.get(0);
			System.err.println("http://218.2.197.230:8889" + url);
		}

	}
}